<script setup>
const props = defineProps({
  label: {
    type: String,
    default: "",
  },
  active: {
    type: Boolean,
    default: false,
  },
});
</script>

<template>
  <div :class="['tree-item', { active: props.active }]">
    {{ props.label }}
  </div>
</template>

<style scoped lang="scss">
.tree-item {
  color: #839ecb;
  display: flex;
  align-items: center;
  text-indent: 10px;
  pointer-events: all;
  cursor: pointer;
  transition: all 0.2s;
  padding: 15px 0;

  &::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    border: 1px solid #434d62;
    transition: all 0.2s;
  }
}

.active {
  color: #1979bd;

  &::before {
    background-color: #1979bd;
    border-color: #1979bd;
  }
}
</style>
